package org.example;

import java.util.List;

/**
 *  演示如何获取泛型的类型
 */
public class AppMain {
    public static void main(String[] args) {

        SonString sonString = new SonString();
        System.out.println("-----------------------------------------------");
        SonInteger sonInteger = new SonInteger();
        System.out.println("-----------------------------------------------");
        // 虽然这里传递的是List<AppMain>,但在子类中设置  t = (T) "abc"; 其中打印的是
        //子类中t的类型:class java.lang.String
        SonGeneric<List<AppMain>> listSonList = new SonGeneric<List<AppMain>>();
    }
}
